package com.cms.context.utils;

import org.apache.shiro.SecurityUtils;
import org.apache.shiro.session.Session;
import org.apache.shiro.subject.Subject;

/**
 * @author laolang
 * @version 1.0.0
 * @ClassName UtilsShiro
 */
public class UtilsShiro {

    /**
     * 通过shiro获取session
     * @return
     */
    public static Session getSession(){
        return SecurityUtils.getSubject().getSession();
    }

    /**
     * 通过shiro提取subject
     * @return
     */
    public static Subject getSubject(){
        return SecurityUtils.getSubject();
    }
}
